package com.caius.xiaohashu.count.biz.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * @author Caius
 * @description
 * @since Created in 2025-05-26
 */
@Getter
@AllArgsConstructor
public enum FollowUnfollowTypeEnum {
    FOLLOW(1),
    UNFOLLOW(0);


    private final Integer code;

    public static FollowUnfollowTypeEnum valueOf(Integer code) {
        for (FollowUnfollowTypeEnum followUnfollowTypeEnum : FollowUnfollowTypeEnum.values()) {
            if (Objects.equals(followUnfollowTypeEnum.getCode(), code)) {
                return followUnfollowTypeEnum;
            }
        }
        return null;
    }
}
